#pragma once

#ifndef _STATEWIDGET_BAIDU_MAP_
#define _STATEWIDGET_BAIDU_MAP_

#include <QtWidgets/QWidget>
#include <QtGui>
#include <QtWidgets/QLabel>
#include <qobject.h>

struct DataCountMsg
{
    int ais_total;
    int adsb_total;
    int radar_total;

    int adsb_msg;
    int ais_msg;
    int radar_msg;
};

class StatusWidget : public QWidget
{
    Q_OBJECT

public:
    StatusWidget(QWidget *parent = NULL);
    static double yiweixiang_fangwei_jiaodu_;
    static double yiweixiang_fangwei_jvli_;
public Q_SLOTS:
    void setLocation(double, double);
    void setZoom(int);
    void setScale(double);
    void setGpsTime(const std::string &str, bool is_gps_time = false);
    void setGpsLocation(double lng, double lat, double alt);
    void setDataMessage(DataCountMsg total_count);
    void kmtohm();
private:
    void init();
    void init_color();

    QFrame *frame_line();

private:
    QLabel *m_current_lng;
    QLabel *m_current_lat;

    QLabel *m_current_r;
    QLabel *m_current_a;

    QLabel *m_zoom;
    QLabel *m_scale;
    QLabel *m_gps_time;
    QLabel *m_gps_location;
    QLabel *m_gps_time_text;

    QLabel *m_ais_msg_text;
    QLabel *m_ais_total_text;

    QLabel *m_total_ais;

    QLabel *m_ais_msg;

    QFrame *m_ais_frame;

    QLabel *r_text;

    bool m_is_gps_time_valid;

    double text_lng_;

    

};

#endif
